# 导包
import json


# 读取json数据
def build_data(json_file):
    test_data = []
    # 打开json文件
    with open(json_file, encoding="utf-8") as f:
        # 加载文件中的全部数据
        json_data = json.load(f)
        for i in json_data:
            dept_data = i.get("dept_data")
            status_code = i.get("status_code")
            success = i.get("success")
            code = i.get("code")
            message = i.get("message")

            test_data.append((dept_data, status_code, success, code, message))
    return test_data


if __name__ == '__main__':
    print(build_data("../data/dept.json"))

